/**
*	@file QueryTNode.cpp
*
*	@brief this header defines the query clause as QueryTNode structure
*
*	@author li yuchen
*
*	@date 1/28/2011
*/
#include "QueryTNode.h"

string QueryTypeToString(QueryType q_type){
	string q_type_str;
	switch(q_type){
	case FOLLOWS:
		q_type_str = "follows clause";
		break;
	case FOLLOWS_ADV:   
		q_type_str = "follows star clause";
		break;
	case PARENT:	
		q_type_str = "parent clause";
		break;
	case PARENT_ADV:
		q_type_str = "parent star clause";
		break;
	case CALLS:
		q_type_str = "calls clause";
		break;
	case CALLS_ADV:
		q_type_str = "calls star clause";
		break;
	case NEXT:
		q_type_str = "next clause";
		break;
	case NEXT_ADV:
		q_type_str = "next star clause";
		break;
	case AFFECTS:
		q_type_str = "affects clause";
		break;
	case AFFECTS_ADV:
		q_type_str = "affects star clause";
		break;
	case MODIFIES:
		q_type_str = "modifies clause";
		break;
	case USES:
		q_type_str = "uses clause";
		break;
	case COMPARE:
		q_type_str = "compare clause";
		break;
	case PATTERN_Q:
		q_type_str = "pattern clause";
		break;
	case NEXTBIP:
		q_type_str = "next bip clause";
		break;
	case NEXTBIP_ADV:
		q_type_str = "next bip star clause";
		break;
	case AFFECTSBIP:
		q_type_str = "affects bip cluase";
		break;
	case AFFECTSBIP_ADV:
		q_type_str = "affects bip star cluase";
		break;
	case STOP:
		q_type_str = "stop clause";
		break;
	}
	return q_type_str;
}